//index.js
const request =require("../../utils/request")
//获取应用实例
const app = getApp()

Page({
  data: {
    slides:[],
    categories:[]
  },
  //事件处理函数
 
  onLoad: function () {
    // 轮播
   request('/slides').then((res)=>{
    this.setData({
      slides:res.data
    })
    console.log(this.data.slides)
   })
  //  九宫格
   request('/categories').then((res)=>{
    this.setData({
      categories:res.data
    })
    console.log(this.data.categories)
   })
  },
  
})
